<?php


namespace App\Modules\Admin\Services\Seller;


use App\Modules\Admin\Services\BaseService;
use App\Modules\Admin\Entities\Seller\SellerMenuModel;

class SellerMenuServices extends BaseService
{

    public function __construct(SellerMenuModel $sellerMenu)
    {
        $this->model = $sellerMenu;
    }
    /**
     * 菜单列表
     *
     * @param array $params
     * @return array
     */
    public function lists(array $params) : array
    { 
        $lists = $this->model->with($this->with)->orderBy('menu_sort', 'ASC')->get();

        return list_to_tree($lists->toArray());
    }

    public function getSelectLists($request)
    {
        return $this->model->getSelectLists();
    }
}